$(document).ready(function(){
	
	//inizializzo
		$('#sect1 .bg').delay(400).fadeIn('slow');
		$('#sect1 .ico').delay(700).animate({ bottom: '3%' }, 1000);
		$('#sect1 .text').delay(1400).animate({ left: '5%' }, 500);
	
	// menu drop down
	$('#menu li').click(function(){
		
		//nascondo tutto
		$('.text').delay(400).animate({ left: '-50%' }, 500);
		$('.ico').delay(700).animate({ bottom: '-100%' }, 1000);
		$('.bg').delay(1400).fadeOut('slow');
		
		//recupero l'id di quello che devo aprire
		var open = $(this).attr("class");
		
		//apro le cose
		$('#sect'+open+' .bg').delay(400).fadeIn('slow');
		$('#sect'+open+' .ico').delay(700).animate({ bottom: '3%' }, 1000);
		$('#sect'+open+' .text').delay(1400).animate({ left: '5%' }, 500);
		
	});
	
	// semplice dropdown per le info
	$('.info').click(function(){
		$('#contatti p').slideDown('slow');
		$('#open').fadeOut('fast');
	});
	
	$('#contatti').mouseleave(function(){
		$('#contatti p').delay(500).slideUp('slow');
	});
	
});